package com.jookes.signplugin.main;

import java.util.logging.Logger;

import org.bukkit.plugin.java.JavaPlugin;

import com.jookes.signplugin.shop.ShopHandler;

/**
 * The Main class of this plugin. It extends the JavaPlugin class.
 * This class handles the initialisation of EventHandlers and commands.
 * @author Gert-Jan Vercauteren, Jens Walrave
 */
public class Main extends JavaPlugin {

	private ShopHandler shopHandler;
	private Logger log;
	
	public void onEnable()
	{
		log = this.getLogger();
		
		//Handlers
		shopHandler = new ShopHandler(this);
		
		//EventListeners
		getServer().getPluginManager().registerEvents(new SignListener(this), this);
		
		//Add the executors to the commands
		log.info("SignPlugin started");
	}
	
	public void  onDisable()
	{
		log.info("SignPlugin disabled");
	}
	
	/**
	 * Getters and Setters for all the handlers
	 * 
	 */
	public ShopHandler getShopHandler() {
		return shopHandler;
	}

	public void setShopHandler(ShopHandler shopHandler) {
		this.shopHandler = shopHandler;
	}
}